package com.hugo.komovie_first;

import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.widget.RadioGroup;


import com.hugo.komovie_first.base.BaseActivity;
import com.hugo.komovie_first.cinema.CinemaFragment;
import com.hugo.komovie_first.find.FindFragment;
import com.hugo.komovie_first.movie.MovieFragment;
import com.hugo.komovie_first.privilege.PrivilegeFragment;
import com.hugo.komovie_first.user.UserFragment;
import com.hugo.komovie_first.utils.FragmentTabUtils;

import java.util.ArrayList;

import butterknife.Bind;


public class MainActivity extends BaseActivity {
    @Bind(R.id.main_rgs)
    RadioGroup rgs;

    @Override
    public int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    public void initView() {
//        setSupportActionBar(mainToolbar);
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(MovieFragment.newInstance());
        fragments.add(FindFragment.newInstance());
        fragments.add(CinemaFragment.newInstance());
        fragments.add(PrivilegeFragment.newInstance());
        fragments.add(UserFragment.newInstance());
        new FragmentTabUtils(getSupportFragmentManager()
                , fragments
                , R.id.main_fragment_container
                , rgs)
        .setDefaultPostion(0);
//        mainToolbar.setOnClickListener(v -> {
//        });
    }
}
